<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>盒子模型-外边距</title>
  <style>
    div {
      width: 200px;
      height: 200px;
      background-color: pink;

      /* 外边距不会撑大盒子 */
      /* margin: 50px; */
      /* margin-left: 100px; */
      /* margin: 50px 100px; */

      /* 版心居中: 条件 -> 盒子要有宽度 */
      margin: 0 auto;
    }
  </style>
</head>
<body>
  <div>div 标签</div>
</body>
</html>